import request from "@/utils/request";
export const getshangpinglist = (data) => {
  return request({
    url: "goods",
    method: "get",
    params: data,
  });
};

export const getshangpingid = (id) => {
  return request({
    url: `goods/${id}`,
    method: "get",
  });
};
export const getshanchu = (id) => {
  return request({
    url: `goods/${id}`,
    method: "delete",
  });
};
export const getparamsApi = () => {
  return request({
    method: "get",
    url: "categories",
  });
};
export const getmany = (id, params) => {
  return request({
    method: "get",
    url: `categories/${id}/attributes`,
    params,
  });
};
export const postaddForm = (id, data) => {
  return request({
    method: "post",
    url: `categories/${id}/attributes`,
    data,
  });
};
export const changebianji = (id, id1, params) => {
  return request({
    method: "get",
    url: `categories/${id}/attributes/${id1}`,
    params,
  });
};
export const putchangebianji = (id, id2, data) => {
  return request({
    method: "put",
    url: `categories/${id}/attributes/${id2}`,
    data,
  });
};
export const delcategories = (id, id1) => {
  return request({
    method: "delete",
    url: `categories/${id}/attributes/${id1}`,
  });
};
